/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.vng.zing.zprofilefrontend.app;

import com.vng.zing.zprofilefrontend.servers.HServers;

/**
 *
 * @author namnq
 */
public class MainApp {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        ///
        ///http servers
        ///

        HServers hServers = new HServers();
        if (!hServers.setupAndStart()) {
            System.err.println("Could not start http servers! Exit now.");
            System.exit(1);
        }
        //		///
        //		///thrift servers
        //		///
        //		TServers tServers = new TServers();
        //		if (!tServers.setupAndStart()) {
        //			System.err.println("Could not start thrift servers! Exit now.");
        //			System.exit(1);
        //		}
//        SecureRandom random = new SecureRandom();
//
//        for (int i = 0; i < 5000; i++) {
//            String username = new BigInteger(50, random).toString(10);
//            Profile p = new Profile();
//            p.setUsername(username);
//            p.setPassword("123456");
//            p.setDateOfBirth(1000);
//            p.setGender(GENDER.MALE);
//            p.setRole(ROLE.USER);
//            System.out.println(i + "." + ZProfileClientInstance.getInstance().getClient().createProfile(p)+"\n");
//        }
    }
}
